package org.tobaccomain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.tobaccomain.pojo.dto.DownloadParam;
import org.tobaccomain.pojo.dto.PageTobacco;
import org.tobaccomain.pojo.dto.TobaccoInfo;
import org.tobaccomain.pojo.entity.Rfid;
import org.tobaccomain.pojo.entity.TobaccoBasic;

import java.util.List;

@Mapper
public interface TobaccoMapper extends BaseMapper<TobaccoBasic> {

    //获取单料烟分页查询的记录
    List<TobaccoBasic> selectTobaccoList(PageTobacco pageTobacco);

    //获取单料烟分页查询的记录数
    Integer count(PageTobacco pageTobacco);

    //根据叶组查询单料烟
    List<TobaccoBasic> selectGroupTobaccos(List<String> list);

    //根据查询条件导出所有的单料烟数据
    List<TobaccoBasic> downloadAllTobaccos(DownloadParam param );

    //根据指定id导出单料烟数据
    List<TobaccoBasic> downloadTobaccos(List<String> ids);

    //单料烟基本数据导入(无rfid号)
    void uploadTobaccoBasic(List<TobaccoBasic> list);

    //将单料烟信息添加到不足表中
    void recordTobaccoShort(List<TobaccoBasic> list);

    //查询不足表中所有的信息
    List<TobaccoBasic> selectShortList();

    //删除不足表中的所有信息
    void deleteAllRecordAbortShort();

    //根据rfid删除不足单料烟信息
    void deleteShortByRfid(Long rfid);
}
